dnf install -y docker-ce nvidia-container-toolkit

wget "https://ghproxy.net/github.com/docker/compose/releases/download/v2.26.1/docker-compose-linux-x86_64"
mv docker-compose-linux-x86_64 /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
# 配置docker加速
touch /etc/docker/daemon.json
echo '{
    "registry-mirrors": [
        "https://docker.linkos.org",
        "https://docker.linkos.org",
        "https://dockerproxy.com",
        "https://mirror.baidubce.com",
        "https://docker.nju.edu.cn",
        "https://docker.mirrors.sjtug.sjtu.edu.cn/",
        "https://docker.mirrors.ustc.edu.cn",
        "https://docker.m.daocloud.io",
        "https://reg-mirror.qiniu.com"
    ]

}' | sudo tee -a /etc/docker/daemon.json

# 配置运行时
nvidia-ctk runtime configure --runtime=docker

## docker image 更改地址
# /etc/docker/daemon.json
# "data-root": "/data/dockercache"

systemctl enable docker
systemctl restart docker
